#pragma once
#include"hash.h"
namespace klaus
{
	template<class K, class Hash = HashFunc<K>>
	class set
	{
	public:
		struct KOFT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};
		typedef typename HashTable<K,K,KOFT,Hash>::iterator iterator;
		iterator begin()
		{
			return ht.begin();
		}
		iterator end()
		{
			return ht.end();
		}
		pair<iterator, bool> insert(const K& key)
		{
			return ht.insert(key);
		}
		iterator find(const K& key)
		{
			return ht.find(key);
		}
		bool erase(const K& key)
		{
			return ht.erase(key);
		}
	private:
		HashTable<K, K, KOFT, Hash> ht;
	};
}

